package com.rental.houses.client;

import com.rental.common.result.AjaxResult;
import com.rental.model.entity.house.RentalHourse;
import com.rental.model.form.hourse.InsertRentalHourseForm;
import com.rental.model.form.hourse.RentalHourseForm;
import com.rental.model.vo.PageVo;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "house-server")
public interface RentalHourseFeign {

    @GetMapping("/rental-hourse/getRentalHourseList")
    public AjaxResult<List<RentalHourse>> getRentalHourseList();

    @PostMapping("/rental-hourse/getRentalHourseListBySearch")
    public AjaxResult<PageVo<RentalHourse>> getRentalHourseListBySearch(@RequestBody RentalHourseForm rentalHourseForm);

    @GetMapping("/rental-hourse/getRentalHourseDetail/{id}/{uid}")
    public AjaxResult<RentalHourse> getRentalHourseDetail(@PathVariable Long id, @PathVariable Long uid);

    @PostMapping("/rental-hourse/insertRentalHourse")
    public AjaxResult<Boolean> insertRentalHourse(@RequestBody InsertRentalHourseForm insertRentalHourseForm);

    @GetMapping("/rental-hourse/getLandlordWechat/{id}/{uid}")
    public AjaxResult<String> getLandlordWechat(@PathVariable Long id, @PathVariable Long uid);

    @GetMapping("/rental-hourse/getLandlordPhone/{id}/{uid}")
    public AjaxResult<String> getLandlordPhone(@PathVariable Long id, @PathVariable Long uid);

    @GetMapping("/rental-hourse/getRentalHourseListByUid/{uid}")
    public AjaxResult<List<RentalHourse>> getRentalHourseListByUid(@PathVariable Long uid);

    @GetMapping("/rental-hourse/changeStatus/{id}/{uid}")
    public AjaxResult<Boolean> changeStatus(@PathVariable Long id, @PathVariable Long uid);

    @GetMapping("/rental-hourse/getRentalHoursePage/{id}/{state}")
    public AjaxResult<RentalHourse> getRentalHoursePage(@PathVariable Long id, @PathVariable Integer state);

    @GetMapping("/rental-hourse/collectHouse/{id}/{uid}")
    public AjaxResult<Boolean> collectHouse(@PathVariable Long id, @PathVariable Long uid);

    @GetMapping("/rental-hourse/cancelCollectHouse/{id}/{uid}")
    public AjaxResult<Boolean> cancelCollectHouse(@PathVariable Long id, @PathVariable Long uid);

    @GetMapping("/rental-hourse/getValidRentalHourseCount")
    public AjaxResult<Long> getValidRentalHourseCount();

    @GetMapping("/rental-hourse/accusation/{id}")
    public AjaxResult<Boolean> accusation(@PathVariable Long id);
}
